package com.sx.zongzhi.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by XZY on 2017/11/23.
 * 矛盾纠纷列表bean
 */

public class DisputeBean implements Serializable {


    /**
     * page : 1
     * records : 1
     * rows : []
     * total : 1
     */
    private int records;
    private int total;
    private List<RowsBean> rows;
    private PermissionBean permission;

    public int getRecords() {
        return records;
    }

    public PermissionBean getPermission() {
        return permission;
    }

    public void setPermission(PermissionBean permission) {
        this.permission = permission;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<RowsBean> getRows() {
        return rows;
    }

    public void setRows(List<RowsBean> rows) {
        this.rows = rows;
    }

    public static class RowsBean implements Serializable{
        /**
         * acceptance : false
         * id : D115FFBACD7448558B21CD5DF6667D0F
         * issueContent : 将监控本命年吧v和规范个
         * issueStepId : FC30C6DDDF7644208242F121A41A900B
         * issueTypeName : 邻里纠纷
         * name : 水龙头破裂1
         * newOccurDate : 2017-11-28 02:10:12
         * operationList : 10,30,50,70
         * operator : dengai
         * stepStatusCode : 10:新增,30:交办,50:回退,70:上报,90:结案,110:抄告
         * stepStatusName : 新增
         * listState  :待办  已办  办结  下辖待办 下辖办结  历史遗留
         */

        private boolean acceptance;//是否受理（true:受理,false:办理）
        private String id;//事件主键
        private String issueContent;//事件简述
        private String issueStepId;//事件步骤主键
        private String issueTypeName;//事件类别名称
        private String name;//事件名称
        private String newOccurDate;//发生时间
        private String operationList;//事件处理编号，10:办理,30:结案,50:上报,70:交办,90:回退
        private String operator;//操作人
        private int stepStatusCode;//步骤状态编号(10:新增,30:交办,50:回退,70:上报,90:结案,110:抄告)
        private String stepStatusName;//步骤状态名称
        private String listState;//

        public String getListState() {
            return listState;
        }

        public void setListState(String listState) {
            this.listState = listState;
        }

        public boolean isAcceptance() {
            return acceptance;
        }

        public void setAcceptance(boolean acceptance) {
            this.acceptance = acceptance;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getIssueContent() {
            return issueContent;
        }

        public void setIssueContent(String issueContent) {
            this.issueContent = issueContent;
        }

        public String getIssueStepId() {
            return issueStepId;
        }

        public void setIssueStepId(String issueStepId) {
            this.issueStepId = issueStepId;
        }

        public String getIssueTypeName() {
            return issueTypeName;
        }

        public void setIssueTypeName(String issueTypeName) {
            this.issueTypeName = issueTypeName;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getNewOccurDate() {
            return newOccurDate;
        }

        public void setNewOccurDate(String newOccurDate) {
            this.newOccurDate = newOccurDate;
        }

        public String getOperationList() {
            return operationList;
        }

        public void setOperationList(String operationList) {
            this.operationList = operationList;
        }

        public String getOperator() {
            return operator;
        }

        public void setOperator(String operator) {
            this.operator = operator;
        }

        public int getStepStatusCode() {
            return stepStatusCode;
        }

        public void setStepStatusCode(int stepStatusCode) {
            this.stepStatusCode = stepStatusCode;
        }

        public String getStepStatusName() {
            return stepStatusName;
        }

        public void setStepStatusName(String stepStatusName) {
            this.stepStatusName = stepStatusName;
        }
    }

    public static class PermissionBean implements Serializable {
        //普通代办权限
        private boolean deleteIssue;//删除
        private boolean updateIssue;//修改
        private boolean urgentIssue;//加急
        private boolean commandIssue;//领导批示
        private boolean normalIssue;//普通督办权限(true:有,false:无)
        private boolean yellowCardIssue;//黄牌督办
        private boolean redCardIssue; //红牌督办
        private boolean historicalIssue; //历史遗留
        private boolean addIssue; //新增

        //下辖待办权限
        private boolean deleteJurisdictionsIssue;//删除
        private boolean updateJurisdictionsIssue;//修改
        private boolean urgentJurisdictionsIssue;//加急
        private boolean commandJurisdictionsIssue;//领导批示
        private boolean normalJurisdictionsIssue;//普通督办权限(true:有,false:无)
        private boolean yellowCardJurisdictionsIssue;//黄牌督办
        private boolean redCardJurisdictionsIssue; //红牌督办
        private boolean historicalJurisdictionsIssue; //历史遗留

        public boolean isUpdateIssue() {
            return updateIssue;
        }

        public void setUpdateIssue(boolean updateIssue) {
            this.updateIssue = updateIssue;
        }

        public boolean isUpdateJurisdictionsIssue() {
            return updateJurisdictionsIssue;
        }

        public void setUpdateJurisdictionsIssue(boolean updateJurisdictionsIssue) {
            this.updateJurisdictionsIssue = updateJurisdictionsIssue;
        }

        public boolean isDeleteIssue() {
            return deleteIssue;
        }

        public void setDeleteIssue(boolean deleteIssue) {
            this.deleteIssue = deleteIssue;
        }

        public boolean isUrgentIssue() {
            return urgentIssue;
        }

        public void setUrgentIssue(boolean urgentIssue) {
            this.urgentIssue = urgentIssue;
        }

        public boolean isCommandIssue() {
            return commandIssue;
        }

        public void setCommandIssue(boolean commandIssue) {
            this.commandIssue = commandIssue;
        }

        public boolean isNormalIssue() {
            return normalIssue;
        }

        public void setNormalIssue(boolean normalIssue) {
            this.normalIssue = normalIssue;
        }

        public boolean isYellowCardIssue() {
            return yellowCardIssue;
        }

        public void setYellowCardIssue(boolean yellowCardIssue) {
            this.yellowCardIssue = yellowCardIssue;
        }

        public boolean isRedCardIssue() {
            return redCardIssue;
        }

        public void setRedCardIssue(boolean redCardIssue) {
            this.redCardIssue = redCardIssue;
        }

        public boolean isHistoricalIssue() {
            return historicalIssue;
        }

        public void setHistoricalIssue(boolean historicalIssue) {
            this.historicalIssue = historicalIssue;
        }

        public boolean isAddIssue() {
            return addIssue;
        }

        public void setAddIssue(boolean addIssue) {
            this.addIssue = addIssue;
        }

        public boolean isDeleteJurisdictionsIssue() {
            return deleteJurisdictionsIssue;
        }

        public void setDeleteJurisdictionsIssue(boolean deleteJurisdictionsIssue) {
            this.deleteJurisdictionsIssue = deleteJurisdictionsIssue;
        }

        public boolean isUrgentJurisdictionsIssue() {
            return urgentJurisdictionsIssue;
        }

        public void setUrgentJurisdictionsIssue(boolean urgentJurisdictionsIssue) {
            this.urgentJurisdictionsIssue = urgentJurisdictionsIssue;
        }

        public boolean isCommandJurisdictionsIssue() {
            return commandJurisdictionsIssue;
        }

        public void setCommandJurisdictionsIssue(boolean commandJurisdictionsIssue) {
            this.commandJurisdictionsIssue = commandJurisdictionsIssue;
        }

        public boolean isNormalJurisdictionsIssue() {
            return normalJurisdictionsIssue;
        }

        public void setNormalJurisdictionsIssue(boolean normalJurisdictionsIssue) {
            this.normalJurisdictionsIssue = normalJurisdictionsIssue;
        }

        public boolean isYellowCardJurisdictionsIssue() {
            return yellowCardJurisdictionsIssue;
        }

        public void setYellowCardJurisdictionsIssue(boolean yellowCardJurisdictionsIssue) {
            this.yellowCardJurisdictionsIssue = yellowCardJurisdictionsIssue;
        }

        public boolean isRedCardJurisdictionsIssue() {
            return redCardJurisdictionsIssue;
        }

        public void setRedCardJurisdictionsIssue(boolean redCardJurisdictionsIssue) {
            this.redCardJurisdictionsIssue = redCardJurisdictionsIssue;
        }

        public boolean isHistoricalJurisdictionsIssue() {
            return historicalJurisdictionsIssue;
        }

        public void setHistoricalJurisdictionsIssue(boolean historicalJurisdictionsIssue) {
            this.historicalJurisdictionsIssue = historicalJurisdictionsIssue;
        }
    }

    public List<String> getPermissionList(){
        List<String> permissionList=new ArrayList<>();
        if (this.permission.deleteIssue){
            permissionList.add("删除");
        }
        if (this.permission.updateIssue){
            permissionList.add("修改");
        }
        if (this.permission.urgentIssue){
            permissionList.add("加急");
        }
        if (this.permission.commandIssue){
            permissionList.add("领导批示");
        }
        if (this.permission.normalIssue){
            permissionList.add("普通督办");
        }
        if (this.permission.yellowCardIssue){
            permissionList.add("黄牌督办");
        }
        if (this.permission.redCardIssue){
            permissionList.add("红牌督办");
        }
        if (this.permission.historicalIssue){
            permissionList.add("历史遗留");
        }
        return permissionList;
    }

    public List<String> getIssuePermissionList(){
        List<String> permissionList=new ArrayList<>();
        if (this.permission.deleteJurisdictionsIssue){
            permissionList.add("删除");
        }
        if (this.permission.updateJurisdictionsIssue){
            permissionList.add("修改");
        }
        if (this.permission.urgentJurisdictionsIssue){
            permissionList.add("加急");
        }
        if (this.permission.commandJurisdictionsIssue){
            permissionList.add("领导批示");
        }
        if (this.permission.normalJurisdictionsIssue){
            permissionList.add("普通督办");
        }
        if (this.permission.yellowCardJurisdictionsIssue){
            permissionList.add("黄牌督办");
        }
        if (this.permission.redCardJurisdictionsIssue){
            permissionList.add("红牌督办");
        }
        if (this.permission.historicalJurisdictionsIssue){
            permissionList.add("历史遗留");
        }

        return permissionList;
    }
}
